package com.daji.base_data_structure.Tree.binary_tree;

//平衡化一颗二叉搜索树。其实就是将二叉搜索树转化成AVL树
public class BalanceBST {


    public static void main(String[] args) {
        BinaryTreeAPI binaryTreeAPI = new BinaryTreeAPI();
        Integer[] integers = {1,null,2,null,3,null,4,null,null};
        TreeNode treeNode = binaryTreeAPI.initBinaryTree(integers);

        TreeNode treeNode1 = binaryTreeAPI.balanceBST(treeNode);
        System.out.println(treeNode1);
    }

}
